package grape.base.rest.client.impl.role;

import grape.base.rest.client.role.RoleClient;
import grape.base.rest.role.mvc.RoleInnerController;
import grape.base.service.role.po.Role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created by yangwei
 * Created at 2020/6/9 14:36
 */
@Component
public class RoleClientImpl implements RoleClient {

    @Autowired
    private RoleInnerController roleInnerController;

    @Override
    public Role getByRoleId(String roleId) {
        return roleInnerController.getRoleByRoleId(roleId);
    }

    @Override
    public List<Role> getByRoleIds(List<String> roleIds) {
        return roleInnerController.getRoleByRoleIds(roleIds);
    }

    @Override
    public List<Role> getByUserId(String userId) {
        return roleInnerController.getRoleByUserId(userId);
    }
}
